<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
  $(document).ready(function(){

      //return false;

      var val = $('.success').text();
      alert(val)
      $('#copycatTxt').text(val);
      $('#copycatTxt').addClass('success');
      var val = $('.success').html();
      alert(val)
      $('#copycatHtml').html(val);
      $('#copycatHtml').addClass('error');


      $('div.orig').removeClass('success')
                   .addClass('error');


      $('div').css('font-size','30px');
      $('div').css('font-family','comic sans ms');


  });
</script>
<style type="text/css">
  div{
    margin :20px;
  }
  .success{
    color:green;
    background-color:lightgreen;
    border:1px dashed green;
    padding:10px;
  }
  .error{
    color:red;
    background-color:pink;
    border:1px dashed red;
    padding:10px;
  }
</style>
<div class="success orig">
This is success <strong>message</strong> 1.
<ul>
  <li>This is success message 2.</li>
  <li>This is success message 3.</li>
  <li>This is success message 4.</li>
  <li>This is success message 5.</li>
</ul>

This is success message 6.
This is success message 7.
</div>

<div id="copycatTxt"></div>
<div id="copycatHtml"></div>
